<?php

namespace app\queue;

use app\helpers\RedisLock;

class AsbillRepurchaseQueue
{
    //Asiabill 异常支付pending -> success
    public function fire(Job $job, $data)
    {
        $lock = new RedisLock("asbill_repurchase_".$data,10);
        try{
            if($lock->acquire()) {
                dump('***********正在执行订单ID: '.$data.'**********');

            }
            $lock->release();

        }catch (\Exception $e){

            $lock->release();
        }
        $job->delete();
    }
}